A graphical context menu. More...
Public Member Functions | |
ContextMenu () | |
virtual | ~ContextMenu () |
Component * | getParentComponent () const |
void | setParentComponent (Component *parent) |
virtual void | addItem (const char *itemLabel, int attachedIndex)=0 |
virtual void | addSeparator ()=0 |
virtual int | showMenu (int absX, int absY)=0 |
virtual void | exportClassToTree (nkExport::Node *rootNode) override |
virtual void | importClassFromTree (nkExport::Node *rootNode) override |
![]() | |
Exportable () | |
virtual | ~Exportable () |
A graphical context menu.
nkWinUi::ContextMenu::ContextMenu | ( | ) |
Constructor.
|
virtual |
Destructor.
Component* nkWinUi::ContextMenu::getParentComponent | ( | ) | const |
void nkWinUi::ContextMenu::setParentComponent | ( | Component * | parent | ) |
Sets the parent component of the context menu.
parent | The parent component to attach. |
|
pure virtual |
Adds an item, linking it to an index. In the menu, items appear in the order they are declared.
itemLabel | The label of the item to create. |
attachedIndex | The index the entry should have. Will be used to identify the entry during a callback. |
|
pure virtual |
Adds a separator.
|
pure virtual |
Makes the menu pop.
absX | The absolute x position of the menu. |
absY | The absolute y position of the menu. |
|
overridevirtual |
Basic export capability.
rootNode | The root of the tree to populate. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic import capability.
rootNode | The root of the tree to import from. |
Implements nkExport::Exportable.